Record Based Code Structure

ABSTRACT

The compiled code of a computer program is stored in multiple pieces within a database. Each piece is optionally stored within a separate data record. Execution of the computer program includes using database queries to retrieve pieces of the compiled code for execution. The database and associated database management logic are used to provide numerous advantages in execution and management of the computer program. For example, in some embodiments, database queries are used to help facilitate program flow logic.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.12/183,823 filed on Jul. 31, 2008 and also entitled “Record Based CodeStructure.”

BACKGROUND

1. Field of the Invention

The invention is in the field of computing systems, and morespecifically in the fields of computer programming and provisioning.

2. Related Art

In a typical computing model source code is generated by a programmerusing an editor. This source code may be configured to be interpreted atthe time it is executed or compiled into executable code using acompiler. Compiled code typically executes more quickly than interpretedcode because the compiling process includes parsing and syntax checkingprior to execution. Compiling the code also places the code in a form(e.g., object code) that may be directly executable using an operatingsystem.

The compiled code is stored using a filing system, typically providedwith an operating system configured to execute the compiled code. Forexample, the compiled code may be stored in an “.exe” file for executionwithin the Windows operating system. The compiled code may be linked toother files containing executable code, data or scripts. This linkingmay occur prior to or at the time the code is executed. When the code isexecuted the file system is used to identify the file within which thecode is stored and this file is opened and processed by the operatingsystem.

There are several disadvantages to this computing model. For example,modification of the compiled code typically involves recompiling anentire source code or file thereof. If a single function, among manyfunctions, within source code, is modified, then the entire source code,on a file-by-file basis, is recompiled. Further, specific permissionsand specific software (e.g., an editor) are required to modify thesource code. This can be cumbersome when the editor and code are ondifferent computing devices.

Databases and database programs configured to manage the databases arecommonly used to store and access data. Sometimes this data is used bycomputer programs external to database programs. For example, anexternal program may use a database program to retrieve data that isthen operated on by the external program. Database programs may alsoinclude “database stored procedures” which are functions prepared by auser of the database program to operate on a database. Database storedprocedures are limited to operating on stored data and aredifferentiated from other types of computer programs in that theseprocedures are run under the control of (e.g., within) the databaseprogram rather than under direct control of an external operatingsystem.

SUMMARY

Various embodiments of the invention comprise a computing architecturein which executable code, for execution external to a database program,is stored within records of a database. The executable code is retrievedfrom the database at the time of execution. This executable codetypically includes compiled code that is ready for execution on anoperating system. In comparison to the prior art, the executable code ismanaged and accessed via the database program rather than merely via afile system.

Storage of executable code within the records of a database provides avariety of advantages, some of which are provided as examples herein.For example, the code may be easier to manage in a database than a filesystem. The executable code can be stored with a greater degree ofgranularity than would normally be practical using a file system. Insome embodiments, executable code is stored at a granularity such thatindividual functions are located in different data records of thedatabase. In some cases this allows for the executable code to bemanaged, modified or otherwise manipulated at the function level ratherthan at the file level.

During execution of a computer program, database queries are used toretrieve the stored code from the database. The retrieved code is thenexecuted external to the database and supported by the operating system.The code may be executed one part at a time, each part being separatelyretrieved from the database. Queries are optionally used to facilitateconditional program flow. For example, a CASE statement that uses alabel to direct program flow between a number of alternative paths maybe implemented by a database query that uses the label as a queryparameter.

Various embodiments of the invention include a system comprising: acomputing device; operating system logic configured to run on thecomputing device and stored on a computer readable media of thecomputing device; a database stored on a computer readable media andincluding data records configured to store compiled code of a computerprogram; database management logic configured for accessing thedatabase; and code execution logic configured to retrieve the compiledcode from the data records by executing one or more queries on thedatabase management logic, and to execute the retrieved code on theoperating system logic.

Various embodiments of the invention include a method comprising:receiving a request to execute a computer program; executing a firstquery to identify a first database record, of a database, in which asubset of compiled code of the computer program is stored. retrievingfirst code from the identified first database record as a result of thefirst query; providing the retrieved first code to an operating systemfor execution; generating a second query based on a result of theexecution of the retrieved first code; using the generated second queryto identify a second database record, of the database, in which compiledcode of the computer program is stored; retrieving the compiled codefrom the second database record as a result of the second query; andproviding the retrieved compiled code to the operating system forexecution.

Various embodiments of the invention include a method comprising:receiving source code of a computer program, the source code comprisinga plurality of functions; compiling the plurality of functions, thecompiled functions being configured for execution on an operatingsystem; storing each of the compiled plurality of functions in aseparate database record; and indexing each of the separate databaserecords using an identifier of the function stored in the databaserecord, the identifiers being configured to select members of theplurality of functions according to program flow logic.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a computing system, according to various embodimentsof the invention.

FIG. 2 illustrates a data structure, according to various embodiments ofthe invention.

FIG. 3 illustrates a distributed computing system, according to variousembodiments of the invention.

FIG. 4 illustrates methods of executing a computer program, according tovarious embodiments of the invention.

FIG. 5 illustrates methods of creating and modifying a computer program,according to various embodiments of the invention.

DETAILED DESCRIPTION

In various embodiments, the invention includes a computing device onwhich a computer program is stored within a database, systems andmethods of storing and modifying the computer program, systems andmethods of executing the computer program, and other features discussedherein. The stored computer program includes compiled code as well asoptionally data, scripts, mark-up language, images, source code, or thelike. The computer program is optionally stored at a granularity whereinindividual functions are store in separate data records. The computerprogram is executed by retrieving the stored compiled code from thedatabase at the time of execution. In some instances the computerprogram is part of an internet based application configured to beaccessed, modified and/or executed though a browser.

The compiled code is object code or byte code that has been parsed andconverted from a human-readable source code form so as to be moreefficiently executed by a software interpreter. Byte code may beexecuted by a virtual machine (e.g., interpreter) or it may be furthercompiled to machine code. Using byte code a computer program may beexecuted in two phases, first compiling source code into byte code, andthen passing the byte code to a virtual machine. Such virtual machinesare portable and exist for popular programming languages such as C,Java, Python, PHP (Hypertext Preprocessor), Forth and Tcl (Tool CommandLanguage). Other examples of byte code include code of the BCPLprogramming language, p-code of UCSD Pascal, Scheme 48, CLISP, CMUCL,Microsoft .NET Common Intermediate Language, among others. Object codeis a representation of source code that has been generated by a compileror assembler. This code may include binary instructions (machine code),data for use by the code, program symbols, relocation information,debugging information, and/or the like. The compiling of object code orbyte code typically includes performing syntax checks on source code andparsing the source code at least one time to generate the object or bytecode.

FIG. 1 illustrates a Computing System 100, according to variousembodiments of the invention. Computing System 100 is configured for thepreparation, storage and/or execution of computer programs. As isfurther described herein, Computing System 100 is optionally adistributed system comprising a plurality of discrete devices configuredto communicate together. Computing System 100 comprises at least oneComputing Device 110. Computing Device 110 includes hardware such as aprocessor, memory and input/output configured to execute a computerprogram. In various embodiments Computing Device 110 comprises a server,a personal computer (PC), a workstation, a portable computing device, orthe like.

Computing Device 110 is optionally connected to other computing devicesvia a Network 120. Network 120 may include the internet, a wide areanetwork, a local area network, or the like. For example, in someembodiments Computing Device 110 includes a server configured to executea computer program, the output of which is communicated over theinternet and presented to a user within a browser. Network 120 may alsobe configured to facilitate communication between various distributedelements of Computing System 100.

Computing System 100 further comprises Operating System Logic 130.Operating System Logic 130 is optionally stored on a computer readablemedia within Computing Device 110 and is configured to run on ComputingDevice 110 so as to support the execution of object code or byte code onComputing Device 110. Operating System Logic 130 is optionally furtherconfigured to support a file system on Computing Device 110. OperatingSystem Logic 130 may include, for example, LINUX, UNIX, BSD Unix, Mac OSX, HPUX, Solaris, Microsoft Windows, or the like.

Computing System 100 further comprises a Database 140. Database 140 istypically a relational database stored on computer readable media andmay be stored on Computing Device 110 or on some other computing devicewithin Computing System 100. Database 140 comprises data recordsconfigured to store compiled code of a computer program. Data recordswithin Database 140 are optionally also configured to store data onwhich the computer will operate, configuration data related to thecomputer program, non-compiled computing instructions, and/or the like.For example, non-compiled computing instructions stored in data recordsof Database 140 may include scripts, mark-up language instructions,source code, code configured to be interpreted in a text format, or thelike. Compiled and non-compiled computing instructions may be stored inthe same and/or different data records. In some embodiments, ComputingSystem 100 comprises an instance of Database 140 configured to storecompiled code and a similar database configured to store related sourcecode. The logical division of compiled code among different data recordsmay be similar to the division of source code among database records.Further details of Database 140 are described elsewhere herein, forexample with respect to FIG. 2.

Database 140 is typically managed by Database Management Logic 150installed on the same computing device as Database 140. DatabaseManagement Logic 150 is configured to access (e.g., read or write)records within Database 140 using queries. Database Management Logic 150may also be configured to control access to Database 140, to definetables of data records within Database 140, to log operations onDatabase 140, and/or to perform other functions commonly available fromdatabase management tools. Database 140 optionally is configured tostore compiled code of more than one computer program.

Computing System 100 further includes Code Execution Logic 160. CodeExecution Logic 160 is configured to retrieve the compiled code from thedata records by executing one or more queries through DatabaseManagement Logic 150, and to execute the retrieved code using OperatingSystem Logic 130. Code Execution Logic 160 may be stored on ComputingDevice 110 or on some other computing device within Computing System100.

More specifically, Code Execution Logic 160 is configured to formulatequeries that are configured to retrieve a next required stored piece ofcompiled code. For example, when a computer program is first executed,Code Execution Logic 160 may be used to formulate a query configured toidentify a data record within Database 140 that includes code of anentry point of the computer program. This query may include anidentifier of the program as well as a parameter indicating that theentry point is required. The results of this query comprise the entrypoint code which is then passed to Operating System Logic 130 forexecution. Code Execution Logic 160 is then used to formulate a secondquery configured to retrieve the next code to be retrieved from Database140 for execution on Operating System Logic 130. The second query may beformulated after the first query is formulated and/or may be formulatedafter the first code is executed.

The second query may be formulated shortly after the first query if theprogram flow following the code retrieved by the first query is known.The program flow is the order in which code will be executed. Programflow may be varied using, for example, conditional branching statementswithin the computer program. These conditional branching statementsinclude, for example, IF statements, WHILE statements, CASE statements,or the like. If the computer program includes a conditional branchingstatement, the contents of the second query may be dependent on resultsof executing the code retrieved using the first query. In someembodiments, therefore, it may not be possible to formulate the secondquery until after the code of the first query is finished executing.

Sometimes conditional branching statements include a label to whichprogram flow should jump. In systems of the prior art, this label may beconverted to a pointer. In some embodiments, the label is used as aparameter in the second query. Within the query, this label is used byData Management Logic 150 to identify the data record in which the nextcode to be executed is stored. As a result of this feature, the queryingcapabilities of Database Management Logic 150 may be used to controlprogram flow within the executed program. This may result in severaladvantages. For example, a new option (program flow destination) may beadded to a conditional branching statement by adding an appropriate datarecord to Database 140 and indexing the added data record using a labelto be included in a query by Code Execution Logic 160. In variousembodiments, parameters included in queries are received by CodeExecution Logic 160 from a user, from a command line, from aconfiguration file, from an examination of available hardware, retrievedfrom a database, web request data, and/or another computer program.

Code Execution Logic 160 may be configured to formulate and executefurther queries, following the second query, having similarcharacteristics. This process may be repeated until program termination.

Computing System 100 optionally further includes Code Compilation Logic170 configured to generate the compiled code from source code. CodeCompilation Logic 170 is optionally a standard compiler configured forcompiling source code to byte or object code. Code Compilation Logic 170is alternatively a customized compiler configured to compile source codeto byte or object code, and to output the source code in a piecemealform including pieces of compiled code that are of appropriate scope forstorage in Database 140. For example, Compilation Logic 170 may dividethe compiled code into parts at the function (procedure) level, afunctional level, by class definition, or into other logical elements.In some embodiments, the compiled code is divided into parts based onprogram flow within the computer program. In these embodiments, thecompiled code may be divided at points where jumps to labels within thecode are made. In some embodiments, Code Compilation Logic 170 isconfigured to automatically compile received source code and then storethe compiled code in Database 140. Code Compilation Logic 170 may bestored in Computing Device 110 or some other computing device ofComputing System 100. In some embodiments, Code Completion Logic 170 isconfigured to store definition code for a class in a data record, oralternatively store each class method of a class in a separate datarecord.

Computing System 100 optionally further includes Code Management Logic180 configured for modifying and otherwise manipulating the compiledcode. In some embodiments Code Management Logic 180 is configured for auser to access source code, retrieve the accessed source code, edit thesource code, compile the source code using Code Compilation Logic 170,and/or store the compiled source code in Database 140. Code ManagementLogic 180 typically uses Database Management Logic 150 for accessing,retrieving, and storing compiled code in Database 140. DatabaseManagement Logic 150 optionally further uses Database Management Logic150 (or an instance thereof) to access source code stored in Database140 or another database.

Code Management Logic 180 is optionally configured for use within a webbrowser. For example, Code Management Logic 180 may be configured tocommunicate with Database Management Logic 150 and/or Code CompilationLogic 170 via the internet. In some embodiments, Code Management Logic180 is configured to access both compiled code and source code using oneor more instances of Database Management Logic 150. For example, if thesource code is stored in a database, Code Management Logic 180 may usequeries to access this source code. The source code may be stored in asingle record or stored in multiple records in a piecemeal fashion. Inembodiments wherein the source code is stored in multiple records, CodeManagement Logic 180 is optionally configured to either present onepiece of source code to a user at a time or several pieces of sourcecode to a user at the same time. When several pieces of source code arepresented to the user at the same time, the results of queries to thedatabase including the source code may be appended together such thatthe source code is presented as a continuous body of human-readabletext. Code Management Logic 180 is optionally configured to present thesource code to a user within an editing environment so that the sourcecode can be modified by the user.

If the source code is edited, Code Management Logic 180 is configured tostore the edited source code. This storage may be in a file or in adatabase. Code Management Logic 180 is further configured to compile theedited source code and store the compiled source code in Database 140.The source code may be compiled in its entirety or in a piecemealfashion. For example, if only one piece of source code was retrievedfrom a database and edited, then only this piece of source code may berecompiled and stored, in the compiled form, in Database 140.

FIG. 2 illustrates a Data Structure 200 as may be included in Database140, according to various embodiments of the invention. Data Structure200 comprises a plurality of Records 210, individually labeled 210A,210B, . . . 210N. Data Structure 200 may include any number of Records210. Each of Records 210 comprises a plurality of Data Fields 220,individually labeled 220A, 220B, . . . 220N. Each of Records 210 mayinclude more or fewer Fields 220 than illustrated in FIG. 2. TheseFields 220 are accessible, readable and writable using queries executedby Database Management Logic 150. Typically, several instances of DataStructure 200 are included in Database 140. Each of Data Structure 200is optionally stored in a different file. The order of Data Fields 220illustrated in FIG. 2 may be varied in alternative embodiments.

In an exemplary embodiment, a Field 220A is configured to store a recordindex value. The index value is typically a unique identifier configuredto identify a particular data record. The index value is optionally usedas a label to control program flow. A Field 220B is configured to storea piece of executable code or source code of a computer program. Asdiscussed elsewhere herein, this code may be stored on a line-by-linebasis, on a function basis, on a functional basis, on a basis based onprogram flow, or some other basis for dividing the computer program intoseparate pieces.

An optional Field 220C is configured to store a data or function type.This type may be the type of a value (or object) expected by the codestored in Field 220B, or the type of a value (or object) returned by thecode stored in Field 220B.

An optional Field 220D is configured to store data on which the codestored in Field 220B is configured to operate on. For example, DataField 220D may include constants for use by the stored code.

Records 210 may include a wide variety of additional fields, representedin FIG. 2 by Field 220N. One or more Fields 220N may include fieldsconfigured to store: further labels configured to control program flow,a label (or index vale) of a subsequent piece of code, a versionidentifier of the code stored in Field 22B, configuration information,mapping information, scheduling information, a human readabledescription or explanation of the code, organization information for aneditor, or the like.

Database 140 is typically stored in one or more tables each including aninstance of Data Structure 200. These tables are optionally combinedusing a JOIN instruction or the like. For example, in some embodimentscode is store in a first database table that includes function types,function names, function parameters and default data, a second tablethat includes source code for each instance of a function, and a thirdtable that includes compiled byte code (or the like) of each functioninstance.

FIG. 3 illustrates distributed embodiments of Computing System 100. Inthese embodiments Computing System 100 is divided into, for example, aManagement Server 305 and a Database Server 310. Management Server 305includes Operating System Logic 130, Code Execution Logic 160, andoptionally Code Compilation Logic 170 and Code Management Logic 180.Database Server 310 includes Database 140 and Database Management Logic150. Management Server 305 and Database Server 310 are configured tocommunicate with each other through part of Network 120, for example aLocal Area Network 120A. Management Server 305 is optionally configuredto communicate with more than one instance of Database server 310. Eachof these instances may be configured to support one or more differentcomputer programs.

Management Server 305 is further configured to communicate with one ormore Clients 315, referred to herein as Client 315A, Client 315B, Client315C, etc. This communication may be through another part of Network120, for example Internet 120B. In some embodiments, Management Server305 is configured to be accessed by users of clients via an internetBrowser 320, e.g., Internet Explorer or Firefox. This access may includeexecution of computer programs stored in Database 140 and/or developmentand modification of these computer programs.

FIG. 4 illustrates methods of executing a computer program, according tovarious embodiments of the invention. As described elsewhere herein, thecomputer program is executed by retrieving executable code from adatabase, and executing this retrieved code on an operating systemexternal to the database. These methods may be performed using ComputingSystem 100, optionally in response to communications received fromClients 315. The steps illustrated in FIG. 4 may be performed inalternative orders.

In a Receive Request Step 410 a request to execute a computer program isreceived by Computing System 100. This request may be received fromanother computing device, from a user of Management Server 305 or from auser of one of Clients 315. In some embodiments the request is receivedvia Browser 320, includes a universal resource locator (URL), and/or iscommunicated via HTTP, is communicated via TCP/IP, and/or is providedusing a POST operation. In addition to information identifying thecomputer program, the request optionally includes other data such assecurity information, configuration data, version information, uploadedfile data, an image, video, or the like.

In an Execute Query Step 415 a query is provided to Database ManagementLogic 150. This query is configured to retrieve a subset of the compiledcode of the computer program from one of Records 210 within Database140. The query may be a predetermined query or may be configured inresponse to data received as part of the request.

In a Retrieve Code Step 420 the execution of the query executed inExecute Query Step 415 results in the retrieval of a first piece of codefrom Database 140. This first piece of code is a subset of the code ofthe computer program. As discussed elsewhere herein, the retrieved codemay be a single function, a single functional unit, a block of codebetween conditional branches in a program flow, a single line of code,or other division of the total code of the computer program.

If the retrieval of code in Retrieve Code Step 420 fails, e.g., if thecode is not available, then in an optional Generate Code Step 425 thecompiled code is generated from source code using Code Compilation Logic170. This generated code is then stored in one of Records 210 ofDatabase 140. Generate Code Step 425 may include all or a subset of thetotal code of the computer program. If all of the code is generated,then different parts of the generated code are stored in differentRecords 210.

In an optional Store Compiled Code Step 430 any code generated inGenerate Code Step 425 is stored in one or more Records 210 of Database140 using Database Management Logic 150. Retrieve Code Step 420 is thenattempted again. This storage may occur in an original copy of Database140 or a cached copy of Database 140. A cached copy is optionallycreated by Code Execution Logic 160 or other elements of ComputingSystem 100.

In a Provide Code Step 435, the executable code retrieved in RetrieveCode Step 420 is provided to Operating System Logic 130 for execution.This execution typically is not dependent of Database Management Logic150. For example, as illustrated in FIG. 3, Operating System Logic 130and Database Management Logic 150 are optionally included on differentcomputing devices. The code is, thus, optionally executed on OperatingSystem Logic 130 remote from Database Management Logic 150.

In a Generate Query Step 440, a second query is generated. This query isconfigured to retrieve further code of the computer program fromDatabase 140. The second query is optionally based on a result of theexecution of the retrieved first code. For example, the execution of theretrieved first code may generate a value that determines program flow,e.g., the object of a subsequent IF or CASE statement. This value maythen be included in the second query as a parameter.

In a Use Query Step 445, the generated second query is used to identifya second of Records 210 of Database 140. This second of Records 210 mayinclude compiled code of the computer program, other executable code,non-compiled code, data, scripts, mark-up language, images, source code,and/or the like.

In a Receive Code Step 450, executable code is received from the seconddatabase record as a result of the second query. This code is receivedby a computing device including Operating System Logic 130, for exampleManagement Server 305. The executable code is optionally received viaNetwork 120.

In a Provide Code Step 455, the executable code received in Receive CodeStep 445 is provided to Operating System Logic 130 for execution. Thisexecution is optionally independent of Database Management Logic 150,although the execution may generate a result that is later used toaccess Database 140 using Database Management Logic 150. As such, theSteps Generate Query 440 through Provide Code 455 may be repeated toretrieve and execute multiple pieces of code from Database 140. Thisprocess may continue until the computer program is terminated.

FIG. 5 illustrates methods of creating and modifying a computer program,according to various embodiments of the invention. In these methodssource code is received and compiled. The compiled code is stored in anindexed manner in multiple pieces within Records 210. The methodoptionally includes further steps in which the source code or other dataare stored, the stored compiled code is modified, the DatabaseManagement Logic 150 is used to provide additional features, and/or thedatabase computer program is provisioned by supplying a copy of Database140. The steps illustrated in FIG. 5 may be performed in alternativeorders.

In a Receive Source Code Step 510, the source code of a computer programis received by Computing System 100. The computer program may bereceived from a storage device, from another computing device viaNetwork 120, or from a user entering text. The received source codetypically includes a plurality of functions.

In a Compile Step 515, the source code received in Receive source CodeStep 510 is compiled using Code Compilation Logic 170. This step mayinclude generating a single block of compiled code or generatingmultiple pieces of compiled code divided as discussed elsewhere herein.For example, Code Compilation logic 170 may be used to divide thecompiled code into pieces that can be separately stored in Records 210of Database 140. For example, in some embodiments, Code Compilationlogic 170 is used to produce separate pieces of compiled code based onfunctions or program flow of the source code. The compiled codegenerated in Compile Step 515 is configured for execution on OperatingSystem Logic 130 and is typically in byte code, object code, machinecode, and/or the like.

In a Store Step 520, the compiled code generated in Compile Step 515 isstored in Records 210 of Database 140. Each piece of the compiled codeis optionally stored in a separate member of Records 210. If the codewas generated in multiple pieces in Compile Step 515 then these piecescan typically be stored directly. However, if Compile Step 515 resultsin a single block of compiled code, then Store Step 520 includesdividing this block into separate pieces. This division may be performedusing Code Management Logic 180 and typically includes dividing the codeup on one or more of the basis discussed elsewhere herein.

Store Step 520 optionally includes storing further information, inaddition to compiled code. For example, Store Step 520 may includestoring other executable code, configuration code, data to be operatedon by the code, type information, or any of the other informationdiscussed herein.

In an Index Step 525, the members of Records 210 in which compiled codeare stored are indexed. The indexing process is typically performedusing Code Management Logic 180 and/or Database Management Logic 150.The indexing is configured for the identification and retrieval of thestored compiled code and optionally other information. Each separatelystored piece of code is typically associated with a unique index or setof indexes. Thus, each piece of code may be identified using theindexing. In some embodiments, Index Step 525 includes adding labels (orother identifiers) meaningful to program flow to Records 210. Forexample, a label added in Index Step 525 may identify a piece of code asa program flow destination following a conditional statement.

In an optional Store Source Step 530, the source code received inReceive Source Code Step 510 is stored. The source code is optionallystored in pieces with the compiled code in Database 140, or in pieces ina separate database having a structure similar to that of Database 140,e.g., where Field 220 is used to store source code rather than compiledcode. Alternatively, Store Source Step 530 may include storing thesource code in a conventional text file.

In an optional Store Configuration Data Step 535, configuration data isstored in Database 140. This configuration data is configured forproviding a user with alternative configurations of the computer programrepresented by the received source code. For example, in someembodiments, more than one set of configuration data is stored inDatabase 140, each set in a different data record. A query executedusing Database Management Logic 150 may then be used to retrieve aconfiguration desired by a user or appropriate for a specific hardwaretarget, or the like.

In an optional Modify Step 540, compiled code within Records 210 ismodified. This modification process may include altering the storedsource code or receiving new source code, compiling the altered or newsource code, and replacing compiled code stored in one or more ofRecords 210 with the new compiled source code. Modify Step 540 may beperformed using Code Management Logic 180 to modify the source code,Code Compilation Logic 170 to compile the source code, and DatabaseManagement Logic 150 to store the new compiled code in one or more ofRecords 210.

Modify Step 540 is optionally performed on one piece of the compiledcode at a time. For example, the modification may be made to compiledcode stored in only one or a subset of Records 210. Other compiled code,of the same computer program, need not necessarily be recompiled. Assuch, the modification and recompiling may be limited to a single pieceof code separated from other code on the basis of function,functionality, program flow, or the like. In some embodiments CodeCompilation Logic 170 is configured to operate in a production mode anda development mode. A greater amount of the compiled code is recompiledin the production mode relative to the development mode, aftermodification of the code.

In an optional Version Management Step 545, version control of thestored compiled code, and other parts of the computer program areperformed using logging capabilities of Database Management Logic 150.For example, in some embodiments, Database Management Logic 150 includesa logging feature configured to log changes in Database 140. Thisfeature may be used to track changes in the computer program Likewise,Database Management Logic 150 may have a rollback feature configured toreturn the database to a previous state. This feature may be used torestore previous versions of code. In some embodiments, DatabaseManagement Logic 150 is configured to keep multiple copies of Database140 or individual Records 210 and to track these copies using versioninformation.

In an optional Control Access Step 550, access control features ofDatabase Management Logic 150 are used to control access to the computerprogram or features thereof. For example, Database Management Logic 150may be configured to control access to particular Records 210 or setsthereof within Database 140 (or control access to Database 140 in itsentirety). This access control can be used to prevent a user fromaccessing pieces of compiled code associated with specificfunctionality, specific data, images, or any other aspect of thecomputer program.

In an optional Provision Step 555, the computer program is provisionedto a computing device by providing a copy of Database 140 to thatcomputing device. This provisioning may occur over Network 120. The steptakes advantage of the fact that, in some embodiments, Database 140 isportable.

Several embodiments are specifically illustrated and/or describedherein. However, it will be appreciated that modifications andvariations are covered by the above teachings and within the scope ofthe appended claims without departing from the spirit and intended scopethereof. For example, the various logic discussed herein may comprisehardware, firmware and/or software stored on a computer readable media.Different parts of a computer program are optionally stored withindifferent tables of Database 140. For example, where a computer programcomprises multiple source files and/or object files, each of these maybe stored in a separate table. The compiled code discussed herein isoptionally configured for execution within a browser. The variousembodiments discussed herein may be applied to web or non-webapplications. The compiled code discussed here may be executed on avirtual machine. Likewise, various components of Computing System 100may include virtual machines.

The embodiments discussed herein are illustrative of the presentinvention. As these embodiments of the present invention are describedwith reference to illustrations, various modifications or adaptations ofthe methods and or specific structures described may become apparent tothose skilled in the art. All such modifications, adaptations, orvariations that rely upon the teachings of the present invention, andthrough which these teachings have advanced the art, are considered tobe within the spirit and scope of the present invention. Hence, thesedescriptions and drawings should not be considered in a limiting sense,as it is understood that the present invention is in no way limited toonly the embodiments illustrated.

1. A system comprising: a computing device; operating system logicconfigured to run on the computing device and stored on a computerreadable media of the computing device; a database stored on a computerreadable media and including data records configured to store compiledcode of a computer program; database management logic configured foraccessing the database; and code execution logic configured to retrievethe compiled code from the data records by executing one or more querieson the database management logic, and to execute the retrieved code onthe operating system logic.
 2. The system of claim 1, wherein at leastpart of the compiled code is stored as a function.
 3. The system ofclaim 1, wherein at least part of the compiled code is configured tocontrol a device external to the database.
 4. The system of claim 1,wherein the compiled code includes compiled python code, compiledMicrosoft .NET Common Intermediate Language code, Perl, PHP, Ruby, orcompiled Java code.
 5. The system of claim 1, wherein the databasefurther includes data records configured to store non-compiled code. 6.The system of claim 1, wherein the database further includes datarecords configured to store source code of the compiled code.
 7. Thesystem of claim 1, wherein the database further includes data recordsconfigured to store hypertext markup language, a script, or extendedmarkup language.
 8. The system of claim 1, wherein the code executionlogic is further configured to execute a computer program by making aplurality of queries on the database and to execute a plurality ofcompiled code returned as a result of these queries.
 9. The system ofclaim 8, wherein a program flow of the computer program is dependent onthe queries.
 10. The system of claim 1, wherein the code execution logicis further configured to determine the queries, the queries being basedon conditional program flow logic.
 11. The system of claim 1, furthercomprising code management logic configured for modifying the compiledcode.
 12. The system of claim 11, wherein the code management logic isconfigured to be accessed via a browser.
 13. The system of claim 11,wherein the code management logic is configured to edit source codewithin the database at a level of individual records.
 14. The system ofclaim 11, wherein the code management logic is configured to edit andrecompile the code on a record-by-record basis.
 15. The system of claim11, wherein the code management logic is configured to provision anapplication to the computing device by sending the database to thecomputing device via a network.
 16. The system of claim 11, wherein thecode-management logic is remote from the computer device.
 17. The systemof claim 1, further comprising code compilation logic configured togenerate the compiled code from source code.
 18. The system of claim 1,wherein the code execution logic is further configured to execute adatabase query to determine if part of the compiled code is available inthe database, and to use the code compilation logic to generate the partof the compiled code if the part of the compiled code is not availablein the database.
 19. The system of claim 18, wherein the code executionlogic is further configured to cache a copy of the generated part of thecompiled code in the database.
 20. A method comprising: receiving arequest to execute a computer program; executing a first query toidentify a first database record, of a database, in which a subset ofcompiled code of the computer program is stored; retrieving first codefrom the identified first database record as a result of the firstquery; providing the retrieved first code to an operating system forexecution; generating a second query based on a result of the executionof the retrieved first code; using the generated second query toidentify a second database record, of the database, in which compiledcode of the computer program is stored; retrieving the compiled codefrom the second database record as a result of the second query; andproviding the retrieved compiled code to the operating system forexecution.
 21. The method of claim 20, wherein the request is receivedover a computing network.
 22. The method of claim 20, wherein the secondquery is based on conditional program flow logic of the computerprogram.
 23. The method of claim 20, wherein the second code consists ofa compiled function.
 24. The method of claim 20, further comprisingdetermining that the compiled code is not available in the database,generating the compiled code, and storing the generated compiled code inthe database.
 25. The method of claim 20 wherein the first codecomprises source code.
 26. A system comprising: a computing device;operating system logic configured to run on the computing device andstored on a computer readable media of the computing device; a databasestored on a computer readable media and including data recordsconfigured to store source code of a computer program; databasemanagement logic configured for accessing the database; and codecompilation logic configured to retrieve the source code from the datarecords by executing one or more queries on the database managementlogic, and to compile the retrieved source code on the operating systemlogic.
 27. A system comprising: a computing device; operating systemlogic configured to run on the computing device and stored on a computerreadable media of the computing device; a database stored on a computerreadable media and including data records configured to store compiledcode of a computer program; code management logic configured toprovision an application to the computing device by sending the databaseto the computing device via a network; database management logicconfigured for accessing the database; and code execution logicconfigured to retrieve the compiled code from the data records byexecuting one or more queries on the database management logic, and toexecute the retrieved code on the operating system logic.